package com.SpringMVC.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.SpringMVC.dao.TPersonMessageMapper;
import com.SpringMVC.model.TPersonMessage;
import com.SpringMVC.service.IPersonMessage;

@Service("personMessageImpl")
public class PersonMessageImpl implements IPersonMessage {
	
	private TPersonMessageMapper personMessageMapper;
	
	
	public TPersonMessageMapper getPersonMessageMapper() {
		return personMessageMapper;
	}

	@Autowired
	public void setPersonMessageMapper(TPersonMessageMapper personMessageMapper) {
		this.personMessageMapper = personMessageMapper;
	}


	public TPersonMessage selectAllByName(String tUserName) {
		
		return personMessageMapper.selectByUserName(tUserName);
	}

	
	public int insertPersonMessage(TPersonMessage tpm) {
		int i=personMessageMapper.insertSelective(tpm);
		return i;
	}

	@Override
	public int updatepersonMessage(TPersonMessage tpm) {
		int i=personMessageMapper.updateByPrimaryKeySelective(tpm);
		return i;
	}

	
	

}
